package top.z.template.parse.ast;

import top.z.template.Context;
import top.z.template.Template;
import top.z.template.parse.Ast.Node;
import top.z.template.parse.Span;

import java.io.IOException;
import java.io.OutputStream;

/**
 * 跳出循环的 break 语句
 */
public class Break extends Node {

    public static final Object BREAK_SENTINEL = new Object();

    public Break(Span span) {
        super(span);
    }

    @Override
    public Object evaluate(Template template, Context context, OutputStream out) throws IOException {
        return BREAK_SENTINEL;
    }
}
